<h1>{$WEB_APP.title}</h1>
{include file="errors.tpl"}

{if count($WEB_APP.titles) neq 0}
		<table width = "100%" border = "0" cellspacing = "0" cellpadding = "0">
			<tr id="head" valign="top">
				<td class = "leftborder" width = "6"><img src = "{$WEB_APP.images_dir}btlg.gif"></td>
				<td class = "col" colspan = 2>{$title}</td>
				<td class = "rightborder" width = "6"><img src = "{$WEB_APP.images_dir}btrg.gif"></td>
			</tr>
		{assign var="tmp" value="2"}
		{foreach from = $WEB_APP.titles item = item name=foreach_row}
			{if $tmp eq 2}
				{assign var="tmp" value="1"}
			{else}
				{assign var="tmp" value="2"}
			{/if}
			{if $item.name eq "header"}
			<tr id = "head" valign = "top">
				<tr>
					<td><img src = "{$WEB_APP.images_dir}bbl.gif" alt = ""></td>
					<td class = "bottomborder" colspan = "2"></td>
					<td><img src = "{$WEB_APP.images_dir}bbr.gif" alt = ""></td>
				</tr>
			</table>
			<br>{assign var="tmp" value="2"}
			<table width = "100%" border = "0" cellspacing = "0" cellpadding = "0">
			<tr id = "head" valign = "top">
				<td class = "leftborder" width = "6"><img src = "{$WEB_APP.images_dir}btlg.gif" alt=""></td>
				<td class = "col" colspan = 2>{$item.value|escape}</td>
				<td class = "rightborder" width = "6"><img src = "{$WEB_APP.images_dir}btrg.gif" alt=""></td>

			{else}
			<tr class = "line{$tmp}">
				<td class = "leftborderw"></td>
				<td class="namecol" height="30" class = "namecol" width = "30%">{$item.name|escape|email}:</td>
				<td class="namecol" height="30" class = "namecol" width = "70%">{$item.value}</td>
				<td class = "rightborderw"></td>
			</tr>
			{/if}
		{/foreach}
			<tr>
				<td><img src = "{$WEB_APP.images_dir}bbl.gif"></td>
				<td class = "bottomborder" colspan = "2"></td>
				<td><img src = "{$WEB_APP.images_dir}bbr.gif"></td>
			</tr>
		</table>		
	{/if}
	{if $WEB_APP.rows_count > 0}
		<br>
		<h1>{$text.txt_results}</h1>
		{include file="table_header.tpl" columns=$WEB_APP.columns}
		{include file="table_rows.tpl" index='id' items=$WEB_APP.rows columns=$WEB_APP.columns}
		{include file="table_footer.tpl" columns_count=$WEB_APP.columns_count}
	{/if}
	
	{if $WEB_APP.themes_count > 0}
		<br>
		{include file="table_header.tpl" columns=$WEB_APP.themes_columns}
		{include file="table_rows.tpl" index='id' items=$WEB_APP.themes columns=$WEB_APP.themes_columns}
		{include file="table_footer.tpl" columns_count=$WEB_APP.themes_columns_count}
	{/if}
